using Google.ProtocolBuffers;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsgBackground
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class SKBuiltinBuffer_t : GeneratedMessageLite<SKBuiltinBuffer_t, SKBuiltinBuffer_t.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<SKBuiltinBuffer_t, SKBuiltinBuffer_t.Builder>
		{
			private bool resultIsReadOnly;
			private SKBuiltinBuffer_t result;
			protected override SKBuiltinBuffer_t.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override SKBuiltinBuffer_t MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override SKBuiltinBuffer_t DefaultInstanceForType
			{
				get
				{
					return SKBuiltinBuffer_t.DefaultInstance;
				}
			}
			public uint ILen
			{
				get
				{
					return this.result.ILen;
				}
				set
				{
					this.SetILen(value);
				}
			}
			public ByteString Buffer
			{
				get
				{
					return this.result.Buffer;
				}
				set
				{
					this.SetBuffer(value);
				}
			}
			public Builder()
			{
				this.result = SKBuiltinBuffer_t.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(SKBuiltinBuffer_t cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private SKBuiltinBuffer_t PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					SKBuiltinBuffer_t other = this.result;
					this.result = new SKBuiltinBuffer_t();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override SKBuiltinBuffer_t.Builder Clear()
			{
				this.result = SKBuiltinBuffer_t.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override SKBuiltinBuffer_t.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new SKBuiltinBuffer_t.Builder(this.result);
				}
				return new SKBuiltinBuffer_t.Builder().MergeFrom(this.result);
			}
			public override SKBuiltinBuffer_t BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override SKBuiltinBuffer_t.Builder MergeFrom(IMessageLite other)
			{
				if (other is SKBuiltinBuffer_t)
				{
					return this.MergeFrom((SKBuiltinBuffer_t)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override SKBuiltinBuffer_t.Builder MergeFrom(SKBuiltinBuffer_t other)
			{
				return this;
			}
			public override SKBuiltinBuffer_t.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override SKBuiltinBuffer_t.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(SKBuiltinBuffer_t._sKBuiltinBufferTFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = SKBuiltinBuffer_t._sKBuiltinBufferTFieldTags[num2];
					}
					uint num3 = num;
					if (num3 == 0u)
					{
						throw InvalidProtocolBufferException.InvalidTag();
					}
					if (num3 != 8u)
					{
						if (num3 != 18u)
						{
							if (WireFormat.IsEndGroupTag(num))
							{
								return this;
							}
							this.ParseUnknownField(input, extensionRegistry, num, text);
						}
						else
						{
							this.result.hasBuffer = input.ReadBytes(ref this.result.buffer_);
						}
					}
					else
					{
						this.result.hasILen = input.ReadUInt32(ref this.result.iLen_);
					}
				}
				return this;
			}
			public SKBuiltinBuffer_t.Builder SetILen(uint value)
			{
				this.PrepareBuilder();
				this.result.hasILen = true;
				this.result.iLen_ = value;
				return this;
			}
			public SKBuiltinBuffer_t.Builder ClearILen()
			{
				this.PrepareBuilder();
				this.result.hasILen = false;
				this.result.iLen_ = 0u;
				return this;
			}
			public SKBuiltinBuffer_t.Builder SetBuffer(ByteString value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBuffer = true;
				this.result.buffer_ = value;
				return this;
			}
			public SKBuiltinBuffer_t.Builder ClearBuffer()
			{
				this.PrepareBuilder();
				this.result.hasBuffer = false;
				this.result.buffer_ = ByteString.Empty;
				return this;
			}
		}
		public const int ILenFieldNumber = 1;
		public const int BufferFieldNumber = 2;
		private static readonly SKBuiltinBuffer_t defaultInstance;
		private static readonly string[] _sKBuiltinBufferTFieldNames;
		private static readonly uint[] _sKBuiltinBufferTFieldTags;
		private bool hasILen;
		private uint iLen_;
		private bool hasBuffer;
		private ByteString buffer_ = ByteString.Empty;
		private int memoizedSerializedSize = -1;
		public static SKBuiltinBuffer_t DefaultInstance
		{
			get
			{
				return SKBuiltinBuffer_t.defaultInstance;
			}
		}
		public override SKBuiltinBuffer_t DefaultInstanceForType
		{
			get
			{
				return SKBuiltinBuffer_t.DefaultInstance;
			}
		}
		protected override SKBuiltinBuffer_t ThisMessage
		{
			get
			{
				return this;
			}
		}
		public uint ILen
		{
			get
			{
				return this.iLen_;
			}
		}
		public ByteString Buffer
		{
			get
			{
				return this.buffer_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasILen;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasILen)
				{
					num += CodedOutputStream.ComputeUInt32Size(1, this.ILen);
				}
				if (this.hasBuffer)
				{
					num += CodedOutputStream.ComputeBytesSize(2, this.Buffer);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private SKBuiltinBuffer_t()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] sKBuiltinBufferTFieldNames = SKBuiltinBuffer_t._sKBuiltinBufferTFieldNames;
			if (this.hasILen)
			{
				output.WriteUInt32(1, sKBuiltinBufferTFieldNames[1], this.ILen);
			}
			if (this.hasBuffer)
			{
				output.WriteBytes(2, sKBuiltinBufferTFieldNames[0], this.Buffer);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasILen)
			{
				num ^= this.iLen_.GetHashCode();
			}
			if (this.hasBuffer)
			{
				num ^= this.buffer_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			SKBuiltinBuffer_t sKBuiltinBuffer_t = value as SKBuiltinBuffer_t;
			return sKBuiltinBuffer_t != null && (this.hasILen == sKBuiltinBuffer_t.hasILen && (!this.hasILen || this.iLen_.Equals(sKBuiltinBuffer_t.iLen_))) && (this.hasBuffer == sKBuiltinBuffer_t.hasBuffer && (!this.hasBuffer || this.buffer_.Equals(sKBuiltinBuffer_t.buffer_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<SKBuiltinBuffer_t, SKBuiltinBuffer_t.Builder>.PrintField("iLen", this.hasILen, this.iLen_, writer);
			GeneratedMessageLite<SKBuiltinBuffer_t, SKBuiltinBuffer_t.Builder>.PrintField("Buffer", this.hasBuffer, this.buffer_, writer);
		}
		public static SKBuiltinBuffer_t ParseFrom(byte[] data)
		{
			return SKBuiltinBuffer_t.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private SKBuiltinBuffer_t MakeReadOnly()
		{
			return this;
		}
		public static SKBuiltinBuffer_t.Builder CreateBuilder()
		{
			return new SKBuiltinBuffer_t.Builder();
		}
		public override SKBuiltinBuffer_t.Builder ToBuilder()
		{
			return SKBuiltinBuffer_t.CreateBuilder(this);
		}
		public override SKBuiltinBuffer_t.Builder CreateBuilderForType()
		{
			return new SKBuiltinBuffer_t.Builder();
		}
		public static SKBuiltinBuffer_t.Builder CreateBuilder(SKBuiltinBuffer_t prototype)
		{
			return new SKBuiltinBuffer_t.Builder(prototype);
		}
		static SKBuiltinBuffer_t()
		{
			SKBuiltinBuffer_t.defaultInstance = new SKBuiltinBuffer_t().MakeReadOnly();
			SKBuiltinBuffer_t._sKBuiltinBufferTFieldNames = new string[]
			{
				"Buffer",
				"iLen"
			};
			SKBuiltinBuffer_t._sKBuiltinBufferTFieldTags = new uint[]
			{
				18u,
				8u
			};
			object.ReferenceEquals(SKBuiltinBufferT.Descriptor, null);
		}
	}
}
